import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizSixteenPf = (params) => {
  params.head.transCode = 'queryBizSixteenPf';
  return request({
    url: '/biz/sixteen/bizSixteenPf/queryBizSixteenPf',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizSixteenPfListPage = (params) => {
  params.head.transCode = 'queryBizSixteenPfListPage';
  return request({
    url: '/biz/sixteen/bizSixteenPf/queryBizSixteenPfListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizSixteenPf = (params) => {
  params.head.transCode = 'saveBizSixteenPf';
  return request({
    url: '/biz/sixteen/bizSixteenPf/saveBizSixteenPf',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizSixteenPfList = (params) => {
  params.head.transCode = 'saveBizSixteenPfList';
  return request({
    url: '/biz/sixteen/bizSixteenPf/saveBizSixteenPfList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizSixteenPf = (params) => {
  params.head.transCode = 'saveOrUpdateBizSixteenPf';
  return request({
    url: '/biz/sixteen/bizSixteenPf/saveOrUpdateBizSixteenPf',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizSixteenPfList = (params) => {
  params.head.transCode = 'saveOrUpdateBizSixteenPfList';
  return request({
    url: '/biz/sixteen/bizSixteenPf/saveOrUpdateBizSixteenPfList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizSixteenPf = (params) => {
  params.head.transCode = 'updateBizSixteenPf';
  return request({
    url: '/biz/sixteen/bizSixteenPf/updateBizSixteenPf',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizSixteenPf = (params) => {
  params.head.transCode = 'deleteBizSixteenPf';
  return request({
    url: '/biz/sixteen/bizSixteenPf/deleteBizSixteenPf',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizSixteenPfList = (params) => {
  params.head.transCode = 'deleteBizSixteenPfList';
  return request({
    url: '/biz/sixteen/bizSixteenPf/deleteBizSixteenPfList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizSixteenPfExcel = (params) => {
  downloadExcel({
    url: '/biz/sixteen/bizSixteenPf/excelDownload/exportBizSixteenPfExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
